<?php get_header(); ?>
<?php get_sidebar(); ?>

<div id="content">
<?php if (have_posts()) : ?>
<?php $post = $posts[0]; ?>

<?php /* If this is a category archive */ if (is_category()) { ?>				
		<h2 class="pagetitle">分类“<?php echo single_cat_title(); ?>”的存档</h2>
		
 	  <?php /* If this is a daily archive */ } elseif (is_day()) { ?>
		<h2 class="pagetitle"><?php the_time('Y年n月j日'); ?>的存档</h2>
		
	 <?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
		<h2 class="pagetitle"><?php the_time('Y年n月'); ?>的存档</h2>

		<?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
		<h2 class="pagetitle"><?php the_time('Y年'); ?>的存档</h2>
		
	  <?php /* If this is a search */ } elseif (is_search()) { ?>
		<h2 class="pagetitle">搜索结果</h2>
		
	  <?php /* If this is an author archive */ } elseif (is_author()) { ?>
		<h2 class="pagetitle">作者存档</h2>

		<?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
		<h2 class="pagetitle">Blog 存档</h2>

		<?php } ?>
		<div class="navigation">
			<div class="alignleft"><?php next_posts_link('&laquo; 较旧文章') ?></div>
			<div class="alignright"><?php previous_posts_link('较新文章 &raquo;') ?></div>
		</div>

<?php while (have_posts()) : the_post(); ?>
<h3><a href="<?php the_permalink() ?>" rel="bookmark" title="到《<?php the_title(); ?>》的永久链接"><?php the_title(); ?></a></h3>
<div class="contenttext">
<?php the_excerpt('<p>Read more &raquo;</p>'); ?>
</div>

<p class="postinfo"><?php the_author() ?>|分类:<?php the_category(', ') ?>|<?php the_time('Y年m月d日 l') ?><br />
<a href="<?php comments_link(); ?>"><strong>评论:</strong> <?php comments_number('发表评论','1','%'); ?></a> 
<?php edit_post_link('编辑',' | ',''); ?></p>

<?php endwhile; ?>
<div class="navigation">
<p><span class="prevlink"><?php next_posts_link('&laquo; 较旧文章') ?></span>
<span class="nextlink"><?php previous_posts_link('较新文章 &raquo;') ?></span></p>
</div>

<?php else : ?>
<h2>没有内容</h2>
<p>抱歉，您要找的东西不在这里。</p>
<?php endif; ?>

</div>
<?php get_footer(); ?>